import _ from 'lodash';

export default {
    namespaced: true,
    state: {
        stationInfo: {
            isFullScreen: false,
            isHideAside: false,
            isAllScreen: false
        }
    },
    mutations: {
        setInfo (state, payload) {
            const info = payload;
            _.extend(state.stationInfo, info);
        },
        setSubName (state, payload) {
            state.stationInfo.subName = payload;
        }
    },
    actions: {
        updateInfo ({ commit }, obj) {
            commit('setInfo', obj);
        },
        updateSubName ({ commit }, name) {
            commit('setSubName', name);
        }
    }
};
